package com.dgw.utils;

import java.util.List;

import com.github.pagehelper.PageInfo;

public class PageInfoToPageUtil {
	
	
	@SuppressWarnings({ "unchecked", "rawtypes" })
	public static <T> Page<T> conversion(PageRows pageRows,PageInfo<T> pageInfo,List<T> list){
		return new Page(pageRows.getCurrentPage(),pageInfo.getTotal(),pageRows.getPageSize(),pageInfo.getStartRow(),pageInfo.getEndRow(),list); 
	}
}
